﻿<div class="row" ng-controller="DataTableCtrl">
    <div class="col-xs-12 col-md-12">
        <div class="widget">
            <div class="widget-header ">
                <div class="widget-buttons">
                    <a href="" widget-maximize></a>
                    <a href="" widget-collapse></a>
                    <a href="" widget-dispose></a>
                </div>
            </div>
            <div class="widget-body">
                <form ng-submit="addPerson(data2)">
                <table ui-jq="dataTable" ui-options="simpleTableOptions" class="table table-striped">
                    <thead>
                        <tr>
                            <th>
                                <div class="form-group">
                                    <label>
                                        <input class="form-control" type="number" name="id" ng-model="data2.id" value="">
                                    </label>
                                </div>
                            </th>
                            <th>
                                <div class="form-group">
                                    <label>
                                        <input type="text" class="form-control" name="firstName" ng-model="data2.firstName" value="">
                                    </label>
                                </div>
                            </th>
                            <th>
                                <div class="form-group">
                                    <label>
                                        <input type="text" class="form-control" name="lastName" ng-model="data2.lastName" value="">
                                    </label>
                                </div>
                            </th>
                            <th>
                                <label>
                                    <button type="submit" class="btn btn-success">新增</button>
                                </label>
                            </th>
                        </tr>
                        <tr>
                            <th style="width: 20%" >id</th>
                            <th style="width: 25%">firstName</th>
                            <th style="width: 25%">lastName</th>
                            <th style="width: 10%"></th>
                        </tr>
                    </thead>
                    <tbody>
                    <tr ng-repeat="item in goods_informations track by $index">
                        <td>{{ item.id }}</td>
                        <td>{{ item.firstName }}</td>
                        <td>{{ item.lastName }}</td>
                        <td>
                            <button type="button" ng-click="modifyPerson($index)" class="btn btn-warning">修改</button>     <button type="button" ng-click="removePerson($index)" class="btn btn-danger">删除</button>
                        </td>
                    </tr>
                    </tbody>
                </table>
                </form>
            </div>
        </div>
    </div>
</div>